<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>数据趋势图</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
<style type="text/css">
	body{
	background-image:url('<%=basePath%>images/background4.jpg');
	background-repeat:no-repeat;
	}
	.chart_btn{
		width:100px;
		height:50px;
		margin:0 20px;
		background-color:pink;
		font-size:15px;
		font-family:微软雅黑;
	}
	.chart{
		width:600px;
		height:600px;
		border:1px solid #663333;
		margin:0px auto;
	}
</style>
<script type="text/javascript">
function loadXMLDoc(){
	var xmlhttp;
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
	    {
	    document.getElementById("showChart").innerHTML=xmlhttp.responseText;
	    }
	  }
	xmlhttp.open("GET","<%=basePath%>jfreechart/HealthdataChartAction!LineChartView?userid=${temploginbean.userId}&charttype=BloodSugar",true);
	xmlhttp.send();
}

function showChart(charttype){
	window.location="<%=basePath%>jfreechart/HealthdataChartAction!LineChartView?userid=${temploginbean.userId}&charttype="+charttype;
}
</script>
  </head>
  
  <body>
   <jsp:include page="../head.jsp"></jsp:include>
   
   	<div class="rightcase">
 	   <div style="width:100%;margin:0 auto;background-color:#ffffff;"> 	
	  		<div style="width:100%;height:60px;margin:0 auto;text-align:center;padding:50px 0;">
	  			<input class="chart_btn" type="button" value="血糖趋势图" onclick="showChart('BloodSugar');"/>
		   		<input class="chart_btn" type="button" value="血压趋势图" onclick="showChart('DiastolicPressure');"/>
		   		<input class="chart_btn" type="button" value="尿蛋白趋势图" onclick="showChart('SystolicPressure');"/>
		   		<input class="chart_btn" type="button" value="体重趋势图" onclick="showChart('UriaProtein');"/>
	  		</div>
 	   	  		<!-- <div id="showChart" class="chart"></div> -->
   
     </div> 
     </div> 
    <%@ include file="../foot.jsp"%>
  </div>
  </body>
</html>
